<template>
  <div>
    <vol-box
      :lazy="true"
      v-model="dialogVisible"
      title="DMS市场选项"
      :height="500"
      :width="1200"
      :padding="1"
      :draggable="true">
      <div>
        <table>
            <tr v-for="(x,i) in Math.floor(dms_market.length/5)" :key="i">
                <td v-for="(y,j) in 5" :key="j">
                     <div>{{dms_market[i*5+j].shuom}}:</div><el-select v-model="dms_market[i*5+j].initvalue" filterable clearable=true placeholder="请选择">
                        <el-option
                        v-for="item in dms_market[i*5+j].select_item"
                        :key="item.xuanx"
                        :label="item.shuoM_1"
                        :value="item.xuanx">
                        </el-option> 
                    </el-select>
                </td>
            </tr>
        </table>
      </div>
      <template #footer>

        <div>
<!-- <el-button
            type="primary"
            size="mini"
            v-show="isshow1"
            @click="get_all_req_list"
            >保存</el-button
          > -->
          <el-button type="default" size="mini" @click="dialogVisible = false"
            >关闭</el-button
          >
   
        </div></template
      >
    </vol-box>
  </div>
</template>
<script>
import VolBox from "@/components/basic/VolBox.vue";
import { ElMessage, ElMessageBox } from 'element-plus';
import abc from "@/uitils/h_common.js";//这是默认的写法

export default {
components: {VolBox,abc },
data() {
 return {
    title:"",
    dialogVisible: false,
    isshow1:true,
    dms_market:[],//dms市场选项
    zid_table:[],//选项&选项值
    value: ''
 };
 },
 setup() {},
 destroyed() {},
 mounted() {
    this.$nextTick(() => { 
        //console.log(this.$store.getters.data().MOBBH);
    });
},
methods: {
    show_w(){  
         this.$nextTick(() => { 
            const loading = this.$loading({//等待
            lock: true,
            text: 'Loading',
            spinner: 'el-icon-loading',
            background: 'rgba(0, 0, 0, 0.7)'
            });          
            var turl = "/api/yg_jsgf_head/get_dms_market?xiangm=" + this.$store.getters.data().xiangm;
            console.log(this.$store.getters.data().xiangm);
            this.http.post(turl, {}, true).then((s) => {
                this.dms_market = s.dms_market;//
                //console.log(this.dms_market);
                //console.log(s.yg_xx_list);
                this.zid_table=s.yg_xx_list;
                this.dms_market.forEach(item=>{
                    let tt=this.zid_table.filter(x=>{return item.tezm.trim()==x.tezm.trim()});
                    item.select_item=tt
                    if(tt.length>0) item.shuom=tt[0].shuom
                    item.initvalue=item.tezxj
                })
                 loading.close();//关闭等待
                 this.title=this.$store.getters.data().SHUOM
                this.dialogVisible=true;
                //console.log(this.jsgf_item);
            });
    });
    }
}
};
</script>
